//
//  Family.m
//  Text
//
//  Created by wjn on 15/10/14.
//  Copyright (c) 2015年 WJN. All rights reserved.
//

#import "Family.h"

@implementation Family

- (instancetype)initWithHusband:(Man *)husband withWife:(Woman *)wife withSon:(Child *)son {
    self = [super init];
    if (self) {
        _husband = husband;
        _wife = wife;
        _son = son;
    }
    return self;
}

//便利构造器
+ (instancetype)familyWithHusband:(Man *)husband withWife:(Woman *)wife withSon:(Child *)son {
    
    Family *family = [[Family alloc] initWithHusband:husband withWife:wife withSon:son];
    
    return family;
}

- (void)party {
    NSLog(@"全家聚会");
}



@end
